Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filebeat Crawler and Prospector Refactoring #720

Merged
merged 2 commits into from
Jan 14, 2016

Conversation

ruflin
Copy link
Member

@ruflin ruflin commented Jan 14, 2016

The goal of this PR is that crawler, prospector properly shut down.

  • Start registrar first
  • Introduce waitgroup for started prospectors. Keep list of prospectors in crawler
  • Code cleanup

@ruflin ruflin changed the title First stage of refactoring. PR #626 need to get this clean First stage of refactoring. Jan 14, 2016
@ruflin ruflin changed the title First stage of refactoring. Filebeat Crawler and Prospector Refactoring Jan 14, 2016
@ruflin ruflin force-pushed the prospector-stopping branch 2 times, most recently from 973cd3d to 1728607 Compare January 14, 2016 12:05
@@ -17,7 +17,6 @@ func readLine(reader processor.LineProcessor) (time.Time, string, int, error) {

// Full line read to be returned
if l.Bytes != 0 && err == nil {
logp.Debug("harvester", "full line read")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this line as it generated too much debu output.

@@ -88,8 +95,12 @@ func (fb *Filebeat) Run(b *beat.Beat) error {
// Publishes event to output
go Publish(b, fb)

// registrar records last acknowledged positions in all files.
fb.registrar.Run()
for {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we need a for loop in done channel?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need it. Will remove it.

* Start registrar first
* Introduce waitgroup for started prospectors. Keep list of prospectors in crawler
* Code cleanup
urso pushed a commit that referenced this pull request Jan 14, 2016
Filebeat Crawler and Prospector Refactoring
@urso urso merged commit 0129ab4 into elastic:master Jan 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants